<template>
	<view>
		<my-title :bgColor="bgColor" :height="height">
			<template v-slot:left>
				<view class="head-back">
					<image :src="goBackImg" @click="gotoHome"></image>
				</view>
			</template>
			<template v-slot:center>
				<view class="head-center">
					<text>{{title}}</text>
				</view>
			</template>
		</my-title>
	</view>
</template>

<script>
	import myTitle from '@/components/common/my-title/my-title.vue'

	export default {
		props: ['title'],
		components: {
			myTitle,
		},
		data() {
			return {
				goBackImg: require('@/static/img/common/goBack_fff.svg'),
				height: '49',
				bgColor: '#23D754',
			}
		},
		methods: {
			gotoHome() {
				uni.reLaunch({
					url: '/pages/main/home/home'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.head-center {
		text-align: center;
		line-height: 49px;
		color: #fff;
		font-size: 32rpx;
	}

	.head-back {
		text-align: center;

		image {
			width: 19px;
			height: 19px;
			margin-top: 15px;
		}
	}
</style>
